package com.ruoyi.kjy.domain;

//import cn.easyes.annotation.IndexField;
//import cn.easyes.annotation.IndexId;
//import cn.easyes.common.constants.Analyzer;
//import cn.easyes.common.enums.FieldType;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.mp.domain.CommonEntity;
import com.ruoyi.common.mp.handle.ListToStringHandle;
import com.ruoyi.system.api.domain.SysUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 需求对象 demand
 * 
 * @author ruoyi
 * @date 2023-04-06
 */
@Data
@ApiModel("需求实体")
@TableName(autoResultMap = true)  //BaseTypeHandler 配置
public class Demand extends CommonEntity
{
    private static final long serialVersionUID = 1L;

    /**  */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("id")
    //@IndexId(type = cn.easyes.common.enums.IdType.CUSTOMIZE)
    private Long id;

    @TableField(exist = false)
    //@IndexField(exist = false)
    private String searchWord;
    /** 行业领域 */
    @Excel(name = "行业领域")
    @ApiModelProperty("行业领域")
    @TableField(typeHandler = ListToStringHandle.class)
    //@IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.IK_SMART, searchAnalyzer = Analyzer.IK_SMART)
    private List<String> industrySector;

    @TableField(exist = false)
    //@IndexField(exist = false)
    private SysUser user;
    /** 所在地 */
    @Excel(name = "所在地")
    @ApiModelProperty("所在地")
    @TableField(typeHandler = ListToStringHandle.class)
    //@IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.IK_SMART, searchAnalyzer = Analyzer.IK_SMART)
    private List<String> location;

    /** 预算 */
    @Excel(name = "预算")
    @ApiModelProperty("预算")
    private String budget;

    /** 需求类型 */
    @Excel(name = "需求类型")
    @ApiModelProperty("需求类型")
    private String requirementType;

    /** 作者id */
    @Excel(name = "作者id")
    @ApiModelProperty("作者id")
    //@IndexField(fieldType = FieldType.LONG)
    private Long author;

    @ApiModelProperty("作者姓名")
    //@IndexField(fieldType = FieldType.TEXT)
    private String authorName;

    @ApiModelProperty("审核状态")
    private Integer state;

    @ApiModelProperty("失败理由")
    private String failedReason;
    /** 题目 */
    @Excel(name = "题目")
    @ApiModelProperty("题目")
    //@IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.IK_SMART, searchAnalyzer = Analyzer.IK_SMART)
    private String title;

    /** 内容 */
    @Excel(name = "内容")
    @ApiModelProperty("内容")
    //@IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.IK_SMART, searchAnalyzer = Analyzer.IK_SMART)
    private String content;

    @Excel(name = "截止时间")
    @ApiModelProperty("截止时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //@IndexField(fieldType = FieldType.DATE)
    private Date  deadline;

    @Excel(name = "发布时间")
    @ApiModelProperty("发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //@IndexField(fieldType = FieldType.DATE)
    private Date  releaseTime;
}
